﻿#ifndef LOGINVIEW_H
#define LOGINVIEW_H
#include"XQCreateUserView.h"
#include"XQLoginView.h"
#include"XQDatabaseConnectionModel.h"
#include"XQUserData.h"
#include<QPointer>
class XQDatabaseConnectionView;
class LoginView:public XQLoginView
{
	Q_OBJECT
public:
	LoginView(QWidget* parent = nullptr);
public:
	XQDatabaseConnectionView* databaseView();
signals://信号
	void createAccountViewSignals(XQCreateUserView* view);
	void createDatabaseConnectionViewSignals(XQDatabaseConnectionView* view);
	void databaseConnectionSignals(XQDatabaseConnectionModel data);
	void databaseSaveSignals(XQDatabaseConnectionModel data);
	void registerAccountSignals(const XQUserData& user);
	void sendVerifySignals();
public:
	//初始化
	void init()override;
protected:
	//单机数据库视图
	void pressDatabase();
	//单机注册账号
	void pressRegisterAccount();
protected:
	QPointer<XQDatabaseConnectionView> m_databaseView = nullptr;
	QPointer<XQCreateUserView> m_createAccount = nullptr;
};
#endif // LOGINVIEW_H
